import math

t1 = 13
t2 = 6
t3 = 16

print(math.cos(t1 / 2) * math.cos(t2 / 2) * math.cos(t3 / 3) + math.sin(t1 / 2) * math.sin(t2 / 2) * math.sin(t3 / 3))
print(math.sin(t1 / 2) * math.cos(t2 / 2) * math.cos(t3 / 3) - math.cos(t1 / 2) * math.sin(t2 / 2) * math.sin(t3 / 3))
print(math.cos(t1 / 2) * math.sin(t2 / 2) * math.cos(t3 / 3) + math.sin(t1 / 2) * math.cos(t2 / 2) * math.sin(t3 / 3))
print(math.cos(t1 / 2) * math.cos(t2 / 2) * math.sin(t3 / 3) - math.sin(t1 / 2) * math.sin(t2 / 2) * math.cos(t3 / 3))
